<template>
  <div>
    <div class="mui-numbox"  data-numbox-min='1' style="height:25px;">
					<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
					<input class="mui-input-numbox" type="number" :value="count" ref="input" @change="updateCount"/>
					<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
		</div>
  </div>
</template>
<script>
import mui from '../../lib/mui/js/mui.min.js'
export default {
  mounted() {
    mui('.mui-numbox').numbox()
  },
  props:['count','goodsId'],
  methods: {
    updateCount(){
      var count = parseInt(this.$refs.input.value)
      this.$store.commit('updateSelectCount',{
        goodsId:this.goodsId,
        selectCount:count
      })
    }
  },
  watch:{
    
  }
}
</script>
<style lang="scss" scoped>
  
</style>